package com.ruicar.afs.cloud.apply.common.feign;

import com.alibaba.fastjson.JSONObject;
import com.ruicar.afs.cloud.apply.pre.smallprogram.dto.ChangeBankInfoDTO;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import com.ruicar.afs.cloud.image.entity.ComAttachmentFile;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.Map;

/**
 * @Description: 获取合同签约feign
 * @Author: mingzhi.li
 * @Date: 2020/9/24
 */
@FeignClient(name = "ApplyContractFeign", url = "${com.greatwall.services.manage.url}")
public interface ApplyContractFeign {
    /**
     * 查询贷后银行卡变更信息
     * @param dto
     * @param headers
     * @return
     */
    @ApiOperation("查询贷后银行卡变更信息")
    @PostMapping(value = "/bankCardChange/getBankCardInfo")
    IResponse<JSONObject> queryContractBankInfo(@RequestBody ChangeBankInfoDTO dto , @RequestHeader Map<String, String> headers);

    /**
     * 查询贷后银行卡变更信息
     * @param dto
     * @param headers
     * @return
     */
    @ApiOperation("查询贷后银行卡变更信息")
    @PostMapping(value = "/bankCardChange/getBankCardPermit")
    IResponse<JSONObject> getBankCardPermit(@RequestBody ChangeBankInfoDTO dto , @RequestHeader Map<String, String> headers);

    /**
     * 回传签约文件信息
     * @param file
     * @param headers
     * @return
     */
    @ApiOperation("回传签约文件信息")
    @PostMapping(value = "/contractAttach/receivePermitFile")
    IResponse<JSONObject> sendBankCardPermit(@RequestBody ComAttachmentFile file , @RequestHeader Map<String, String> headers);

}
